﻿CREATE VIEW [dbo].[ASMS_V_Business]
	AS
SELECT 
	B.* ,
	MDICountry.Name as CountryName,
	MDIProvince.Name as ProvinceName,
	MDICity.Name as CityName,
	MDIDistrict.Name as DistrictName
FROM ASMS_Business as B
	left join [ASMS_MasterDataItem] as MDICountry on MDICountry.Code = B.Country
	left join [ASMS_MasterDataItem] as MDIProvince on MDIProvince.Code = B.Province
	left join [ASMS_MasterDataItem] as MDICity on MDICity.Code = B.City
	left join [ASMS_MasterDataItem] as MDIDistrict on MDIDistrict.Code = B.District

